jquery教程

推荐列表 站点导航

当前位置:首页 > jquery > jquery教程 >

js添加背景音乐示例

来源:网络整理  作者:网友投稿  发布时间:2020-12-27 21:16
本文介绍了js添加背景音乐的方法,一个js实现背景音乐播放的代码,有需要的朋友参考下。...

把代码加入body区域中: 复制代码 代码示例: script language=javascript !-- var sound1=song1.mid var sound2=song2.mid var sound3=song3.mid var sound4=song4.mid var sound5=song5.mid var sound6=song6.mid var sound7=song7.mid var sound8=song8.mid var sound9=song9.mid var sound10=song10.mid var x=math.round(math.random()*9) if (x==0) x=sound1 else if (x==1) x=sound2 else if (x==2) x=sound3 else if (x==3) x=sound4 else if (x==4) x=sound5 else if (x==5) x=sound6 else if (x==6) x=sound7 else if (x==7) x=sound8 else if (x==8) x=sound9 else x=sound10 //添加背景音乐代码 if (navigator.appname==microsoft internet explorer) document.write('bgsound src='http://www.dismall.com/thread-957-1-1.html/a_11681/+''+x+''http://www.dismall.com/thread-957-1-1.html/a_11681/+' loop=infinite') else document.write('embed src='http://www.dismall.com/thread-957-1-1.html/a_11681/+''+x+''http://www.dismall.com/thread-957-1-1.html/a_11681/+'hidden=true border=0 width=20 height=20 autostart=true loop=true') //-- /script , 如何用js添加背景音乐呢?大家可以参考如下的js代码,。

相关热词:

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/jq/jc/9849.shtml

相关文章
最新文章
PHP识别相片是否是颠倒的 PHP识别相片是否是颠倒的

时间:2020-12-28

python编程有哪些ide python编程有哪些ide

时间:2020-12-28

python开发工程师是做什么 python开发工程师是做什么

时间:2020-12-28

php构造函数的作用 php构造函数的作用

时间:2020-12-28

php怎么跟数据库连接 php怎么跟数据库连接

时间:2020-12-28

php实现顺序线性表 php实现顺序线性表

时间:2020-12-28

Python多重继承中的菱形继 Python多重继承中的菱形继

时间:2020-12-28

php中break的作用 php中break的作用

时间:2020-12-28

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

js添加背景音乐示例

2020-12-27 编辑:网友投稿

把代码加入body区域中: 复制代码 代码示例: script language=javascript !-- var sound1=song1.mid var sound2=song2.mid var sound3=song3.mid var sound4=song4.mid var sound5=song5.mid var sound6=song6.mid var sound7=song7.mid var sound8=song8.mid var sound9=song9.mid var sound10=song10.mid var x=math.round(math.random()*9) if (x==0) x=sound1 else if (x==1) x=sound2 else if (x==2) x=sound3 else if (x==3) x=sound4 else if (x==4) x=sound5 else if (x==5) x=sound6 else if (x==6) x=sound7 else if (x==7) x=sound8 else if (x==8) x=sound9 else x=sound10 //添加背景音乐代码 if (navigator.appname==microsoft internet explorer) document.write('bgsound src='http://www.dismall.com/thread-957-1-1.html/a_11681/+''+x+''http://www.dismall.com/thread-957-1-1.html/a_11681/+' loop=infinite') else document.write('embed src='http://www.dismall.com/thread-957-1-1.html/a_11681/+''+x+''http://www.dismall.com/thread-957-1-1.html/a_11681/+'hidden=true border=0 width=20 height=20 autostart=true loop=true') //-- /script , 如何用js添加背景音乐呢?大家可以参考如下的js代码,。

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/jq/jc/9849.shtml

相关文章

风云图片

推荐阅读

返回jquery教程频道首页